#ifndef __NODE_CPP__
#define __NODE_CPP__
#include <vector>
#include "../include/all.h"


template <typename T>
Node<T>* Node<T>::cat(Node<T>* follow) {
    follow->next = next;
    return next = follow;
}

/* static */

template <typename T>
bool Node<T>::found(
    Node<T>* that,
    std::vector<std::wstring>& strs,
    std::vector<int>& code) {

    return that->next->data.found(strs, code);
}

template <typename T> FILE* List<T>::file;

template <typename T>
void Node<T>::serialize(Node<T>* that) {
    fwrite(&that->next->data, sizeof(T), 1, List<T>::file);
}

template <typename T>
void Node<T>::print(Node<T>* that) {
    that->next->data.print();
}

template <typename T>
Node<T>* Node<T>::nextNode(Node<T>* that) {
    return that->next;
}

template <typename T>
Node<T>* Node<T>::nowNode(Node<T>* that) {
    return that;
}

template <typename T>
void Node<T>::erase(Node<T>* that) {
    Node<T>* real = that->next;
    that->next = real->next;
    delete real;
}

template class Node<Student>;
template class Node<Course>;


#endif /* __NODE_CPP__ */
